/******************************************************************
 * Copyright (c) 2007 - 2007, Simon Guerard, All rights reserved.
 * 
 * Projet de jeu de course au large.
 * 
 * This File is part of Sail-Race
 * 
 * Sail-Race is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
 * 
 * Sail-Race is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License along with Sail-Race; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 */
package net.simcafamily.sailrace.core;

import java.util.Map;

import org.springframework.stereotype.Component;

/**
 * @version $Revision$
 * @author $Author$
 */
@Component("infosAction")
public class InfosAction implements IForward {

    // champs prives
    private IAction action; // l'action a executer
    private IView view; // la view a afficher
    private Map<String, IForward> etats; // le dictionnaire des etats de
					 // l'action

    // a executer

    /**
     * @return Returns the action.
     */
    public IAction getAction() {
	return action;
    }

    /**
     * @see net.simcafamily.sailrace.core.IForward#getActionName()
     */
    @Override
    public String getActionName() {
	if (action != null) {
	    return action.getClass().getName();
	}
	return null;
    }

    /**
     * @return Returns the etats.
     */
    public Map<String, IForward> getEtats() {
	return etats;
    }

    /**
     * @return Returns the view.
     */
    public IView getVue() {
	return view;
    }

    /**
     * @see net.simcafamily.sailrace.core.IForward#isVueInstance()
     */
    @Override
    public boolean isVueInstance() {
	return false;
    }

    /**
     * @param action
     *            The action to set.
     */
    public void setAction(final IAction action) {
	this.action = action;
    }

    /**
     * @param etats
     *            The etats to set.
     */
    public void setEtats(final Map<String, IForward> etats) {
	this.etats = etats;
    }

    /**
     * @param view
     *            The view to set.
     */
    public void setVue(final IView view) {
	this.view = view;
    }
}
